<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script src="./js/jquery-3.3.1.min.js"></script>
<script src="./js/webConstans.js"></script>


<textarea style="width: 400px;height: 300px;">
<xml>
    <body>测试商家-商品类目</body>
    <trade_type>NATIVE</trade_type>
    <mch_id>11473623</mch_id>
    <sign_type>HMAC-SHA256</sign_type>
    <nonce_str>b1089cb0231011e7b7e1484520356fdc</nonce_str>
    <detail/>
    <fee_type>CNY</fee_type>
    <device_info>WEB</device_info>
    <out_trade_no>20161909105959000000111108</out_trade_no>
    <total_fee>1</total_fee>
    <appid>wxab8acb865bb1637e</appid>
    <notify_url>http: //test.letiantian.com/wxpay/notify</notify_url>
    <sign>78F24E555374B988277D18633BF2D4CA23A6EAF06FEE0CF1E50EA4EADEEC41A3</sign>
    <spbill_create_ip>123.12.12.123</spbill_create_ip>
</xml>
</textarea>
<hr>
<input type="button" value="token" onclick="getWXToken()"><input type="text" id="tokenText" placeholder="这里显示token" width="300px"/>
<hr>

<script>
    function getWXToken() {
        alert("webConstans.basePath=>"+webConstans.basePath);
        var url = webConstans.basePath + "/weixinTest/getAccesToken";
        $.post(url,{},function (data) {
            $("#tokenText").val(data);
        });
    }

</script>

<!-- 搞一个button，请求用户网页授权 用户点击，弹出二维码页面 -->
<hr>
<input type="button" value="获取微信用户信息二维码" id="qrCode">
<hr>
<img id="qrCodeImg" src="https://www.waterman.vip/image/authQRCode?rand=10001" >
<script>
    $(function () {
        alert("xxxxx"+webConstans.basePath);

        $("#qrCode").click(function () {
            $("#qrCodeImg").attr("src",webConstans.basePath+"/image/authQRCode?rand="+(new Date().getTime()));
        });

    });

</script>

</body>
</html>